Integrand size = 27, antiderivative size = 35 \[ \int (a+b \cos (c+d x)) (A+B \cos (c+d x)) \sec (c+d x) \, dx=(A b+a B) x+\frac {a A \text {arctanh}(\sin (c+d x))}{d}+\frac {b B \sin (c+d x)}{d} \]
Time = 0.03 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.31 \[ \int (a+b \cos (c+d x)) (A+B \cos (c+d x)) \sec (c+d x) \, dx=A b x+a B x+\frac {a A \text {arctanh}(\sin (c+d x))}{d}+\frac {b B \cos (d x) \sin (c)}{d}+\frac {b B \cos (c) \sin (d x)}{d} \]
A*b*x + a*B*x + (a*A*ArcTanh[Sin[c + d*x]])/d + (b*B*Cos[d*x]*Sin[c])/d + (b*B*Cos[c]*Sin[d*x])/d
Time = 0.44 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {3042, 3447, 3042, 3502, 3042, 3214, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec (c+d x) (a+b \cos (c+d x)) (A+B \cos (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3447 |
\(\displaystyle \int \sec (c+d x) \left ((a B+A b) \cos (c+d x)+a A+b B \cos ^2(c+d x)\right )dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a B+A b) \sin \left (c+d x+\frac {\pi }{2}\right )+a A+b B \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \int (a A+(A b+a B) \cos (c+d x)) \sec (c+d x)dx+\frac {b B \sin (c+d x)}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a A+(A b+a B) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {b B \sin (c+d x)}{d}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle a A \int \sec (c+d x)dx+x (a B+A b)+\frac {b B \sin (c+d x)}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a A \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+x (a B+A b)+\frac {b B \sin (c+d x)}{d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {a A \text {arctanh}(\sin (c+d x))}{d}+x (a B+A b)+\frac {b B \sin (c+d x)}{d}\) |
3.3.18.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 1.62 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.37
method | result | size |
derivativedivides | \(\frac {a A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B a \left (d x +c \right )+A b \left (d x +c \right )+B \sin \left (d x +c \right ) b}{d}\) | \(48\) |
default | \(\frac {a A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B a \left (d x +c \right )+A b \left (d x +c \right )+B \sin \left (d x +c \right ) b}{d}\) | \(48\) |
parts | \(\frac {a A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {\left (A b +B a \right ) \left (d x +c \right )}{d}+\frac {b B \sin \left (d x +c \right )}{d}\) | \(50\) |
parallelrisch | \(\frac {-a A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+a A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+B \sin \left (d x +c \right ) b +\left (A b +B a \right ) x d}{d}\) | \(56\) |
risch | \(x A b +a B x -\frac {i B b \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i B b \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {a A \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {a A \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}\) | \(83\) |
norman | \(\frac {\left (A b +B a \right ) x +\left (A b +B a \right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (2 A b +2 B a \right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {2 B b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 B b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {a A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {a A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(141\) |
Time = 0.29 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.54 \[ \int (a+b \cos (c+d x)) (A+B \cos (c+d x)) \sec (c+d x) \, dx=\frac {2 \, {\left (B a + A b\right )} d x + A a \log \left (\sin \left (d x + c\right ) + 1\right ) - A a \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, B b \sin \left (d x + c\right )}{2 \, d} \]
1/2*(2*(B*a + A*b)*d*x + A*a*log(sin(d*x + c) + 1) - A*a*log(-sin(d*x + c) + 1) + 2*B*b*sin(d*x + c))/d
\[ \int (a+b \cos (c+d x)) (A+B \cos (c+d x)) \sec (c+d x) \, dx=\int \left (A + B \cos {\left (c + d x \right )}\right ) \left (a + b \cos {\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}\, dx \]
Time = 0.20 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.34 \[ \int (a+b \cos (c+d x)) (A+B \cos (c+d x)) \sec (c+d x) \, dx=\frac {{\left (d x + c\right )} B a + {\left (d x + c\right )} A b + A a \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + B b \sin \left (d x + c\right )}{d} \]
Leaf count of result is larger than twice the leaf count of optimal. 79 vs. \(2 (35) = 70\).
Time = 0.29 (sec) , antiderivative size = 79, normalized size of antiderivative = 2.26 \[ \int (a+b \cos (c+d x)) (A+B \cos (c+d x)) \sec (c+d x) \, dx=\frac {A a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - A a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + {\left (B a + A b\right )} {\left (d x + c\right )} + \frac {2 \, B b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1}}{d} \]
(A*a*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - A*a*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + (B*a + A*b)*(d*x + c) + 2*B*b*tan(1/2*d*x + 1/2*c)/(tan(1/2*d*x + 1/2*c)^2 + 1))/d
Time = 0.52 (sec) , antiderivative size = 100, normalized size of antiderivative = 2.86 \[ \int (a+b \cos (c+d x)) (A+B \cos (c+d x)) \sec (c+d x) \, dx=\frac {B\,b\,\sin \left (c+d\,x\right )}{d}+\frac {2\,A\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,A\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \]